import request from 'umi-request';
export async function queryProduct(params) {
  return request('/api/prdProducts/selectByPage', {
    params,
  });
}
export async function queryOneProduct(params) {
  return request('/api/prdProducts/selectById', {
    params,
  });
}
export async function removeProduct(params) {
  return request(`/api/prdProducts/delete/${params.productId}`, {
    method: 'POST',
    data: { ...params},
  });
}
export async function addProduct(params) {
  return request('/api/prdProducts/add', {
    method: 'POST',
    data: { ...params },
  });
}
export async function updateProduct(params) {
  return request('/api/prdProducts/edit', {
    method: 'POST',
    data: { ...params },
  });
}

export async function onSale(params) {
  return request('/api/prdProducts/onSale', {
    method: 'POST',
    data: { ...params },
  });
}

export async function offSale(params) {
  return request('/api/prdProducts/offSale', {
    method: 'POST',
    data: { ...params },
  });
}

export async function queryProcessFlow(params) {
  return request('/api/manTechnologyProcesses/selectByPage', {
    params,
  });
}
